package com.chinairi.mall.controller;


import com.chinairi.common.utils.ResponseUtil;
import com.chinairi.mall.controller.viewobject.GoodsClassCodeVO;
import com.chinairi.mall.controller.viewobject.HomeGroundClassVO;
import com.chinairi.mall.service.IHomeGroundClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.chinairi.common.controller.BaseController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Webgasd
 * @since 2020-10-14
 */
@RestController
@RequestMapping("/home-ground-class")
public class HomeGroundClassController extends BaseController {

    @Autowired
    private IHomeGroundClassService iHomeGroundClassService;

    /**
     * 获取所有商品分类，树形结构（新方法）
     *
     * @throws Exception
     */
    @GetMapping("/getALLClass")
    public void getALLClass() throws Exception {
        List<HomeGroundClassVO> homeGroundClassVOList = iHomeGroundClassService.getALLClass();
        ResponseUtil.showMessage("success", "获取商品大类", homeGroundClassVOList);
    }
}
